<?php

$root_path =__DIR__;
$host = $_SERVER['HTTP_HOST'];
$file = "/www/wwwlogs/git/" . $host . "_" . date('YmdHis', time()) . '.txt';
@mkdir("/www/wwwlogs/git/");

$cmds = [
	"cd {$root_path}",
	"git pull > $file"
];

foreach ($cmds as $cmd) {
	exec($cmd);
}
echo $root_path;